package sg.edu.nus.comp.icreate.ivletalk;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.List;

import android.os.Bundle;
import android.widget.TextView;

public class HelpActivity extends BaseActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_help);
		TextView textView = (TextView) findViewById(R.id.helpInstructionView);
		String message = getMessage();
		textView.setText(message);
	}

	private String getMessage() {
		InputStream inputStream = getResources().openRawResource(R.raw.help);
		InputStreamReader inputreader = new InputStreamReader(inputStream);
		BufferedReader buffreader = new BufferedReader(inputreader);
		String line;
		StringBuilder text = new StringBuilder();
		try {
			while ((line = buffreader.readLine()) != null) {
				text.append(line);
				text.append('\n');
			}
		} catch (Exception e) {
			return null;
		}
		return text.toString();
	}

	@Override
	protected List<?> getDisplayedItemList() {
		// do nothing
		return null;
	}

	@Override
	protected void goToItem(int position) {
		// do nothing

	}

	@Override
	protected boolean handleActionRefresh() {
		// do nothing
		return false;
	}

}
